﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using Data;

namespace Business
{
   public class KhachHangService
    {
       public static List<KhachHangDTO> GetAllKhachHang()
       {
           return KhachHangRepository.GetAllKhachHang();
       }
       public void Insert(KhachHangDTO khachhangDTO)
       {
           KhachHangRepository khachhangrepository = new KhachHangRepository();
           khachhangrepository.Insert(khachhangDTO);

       }
       public void Update(KhachHangDTO khachhangDTO)
       {
           KhachHangRepository khachhangrepository = new KhachHangRepository();
           khachhangrepository.Update(khachhangDTO);

       }
       public static bool KiemTraTonTaiMaKhachHang(int makhachhang)
       {
           return KhachHangRepository.KiemTraTonTaiMaKhachHang(makhachhang);
       }
       public static KhachHangDTO GetKhachHangByID(int makhachhang)
       {
           return KhachHangRepository.GetKhachHangByID(makhachhang);
       }
    }
}
